//
//  EFQuickPayViewController.m
//  EnjogFood
//
//  Created by 王芳 on 17/4/30.
//  Copyright © 2017年 wf. All rights reserved.
//

#import "EFQuickPayViewController.h"
#import "EFShoppingCartViewController.h"
#import "EFSearchViewController.h"

@interface EFQuickPayViewController ()

@end

@implementation EFQuickPayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 30) NormalTitile:@"购物车" Type:ZYJGreenButtonType];
    btn.centerX = kScreenWidth/2.f;
    [btn addTarget:self action:@selector(onClickShoppingBtn) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 300, 100, 30) NormalTitile:@"搜索" Type:ZYJGreenButtonType];
    btn1.centerX = kScreenWidth/2.f;
    [btn1 addTarget:self action:@selector(onClickSearchBtn) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn1];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)onClickShoppingBtn{
    [ICNavigator openLoginWithCompleteBlock:^{
        //加入购物车后，
        EFShoppingCartViewController *shopcart = [[EFShoppingCartViewController alloc] initWithType:1];
        [ICNavigator pushViewController:shopcart animated:YES];
    }];
}

- (void)onClickSearchBtn{
    EFSearchViewController *search = [[EFSearchViewController alloc] init];
    [ICNavigator pushViewController:search animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
